package com.dynamixsoftware.printershare.smb;

import com.dynamixsoftware.printershare.smb.util.Dumper;

class NetServerEnum2Response
  extends SmbComTransactionResponse
{
  private int converter;
  String lastName;
  private int totalAvailableEntries;
  
  int readDataWireFormat(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    int i = paramInt1;
    ServerInfo1 localServerInfo1 = null;
    this.results = new ServerInfo1[this.numEntries];
    for (int j = 0; j < this.numEntries; j++)
    {
      FileEntry[] arrayOfFileEntry = this.results;
      localServerInfo1 = new ServerInfo1(null);
      arrayOfFileEntry[j] = localServerInfo1;
      ServerInfo1.access$102(localServerInfo1, readString(paramArrayOfByte, paramInt1, 16, false));
      int m = paramInt1 + 16;
      int n = m + 1;
      ServerInfo1.access$202(localServerInfo1, 0xFF & paramArrayOfByte[m]);
      int i1 = n + 1;
      ServerInfo1.access$302(localServerInfo1, 0xFF & paramArrayOfByte[n]);
      ServerInfo1.access$402(localServerInfo1, readInt4(paramArrayOfByte, i1));
      int i2 = i1 + 4;
      int i3 = readInt4(paramArrayOfByte, i2);
      paramInt1 = i2 + 4;
      ServerInfo1.access$502(localServerInfo1, readString(paramArrayOfByte, i + ((0xFFFF & i3) - this.converter), 48, false));
    }
    int k = this.numEntries;
    String str = null;
    if (k == 0) {}
    for (;;)
    {
      this.lastName = str;
      return paramInt1 - i;
      str = localServerInfo1.name;
    }
  }
  
  int readParametersWireFormat(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    this.status = readInt2(paramArrayOfByte, paramInt1);
    int i = paramInt1 + 2;
    this.converter = readInt2(paramArrayOfByte, i);
    int j = i + 2;
    this.numEntries = readInt2(paramArrayOfByte, j);
    int k = j + 2;
    this.totalAvailableEntries = readInt2(paramArrayOfByte, k);
    return k + 2 - paramInt1;
  }
  
  int readSetupWireFormat(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    return 0;
  }
  
  public String toString()
  {
    return new String("NetServerEnum2Response[" + super.toString() + ",status=" + this.status + ",converter=" + this.converter + ",entriesReturned=" + this.numEntries + ",totalAvailableEntries=" + this.totalAvailableEntries + ",lastName=" + this.lastName + "]");
  }
  
  int writeDataWireFormat(byte[] paramArrayOfByte, int paramInt)
  {
    return 0;
  }
  
  int writeParametersWireFormat(byte[] paramArrayOfByte, int paramInt)
  {
    return 0;
  }
  
  int writeSetupWireFormat(byte[] paramArrayOfByte, int paramInt)
  {
    return 0;
  }
  
  private class ServerInfo1
    implements FileEntry
  {
    private String commentOrMasterBrowser;
    private String name;
    private int type;
    private int versionMajor;
    private int versionMinor;
    
    private ServerInfo1() {}
    
    public long createTime()
    {
      return 0L;
    }
    
    public int getAttributes()
    {
      return 17;
    }
    
    public String getName()
    {
      return this.name;
    }
    
    public int getType()
    {
      if ((0x80000000 & this.type) != 0) {
        return 2;
      }
      return 4;
    }
    
    public long lastModified()
    {
      return 0L;
    }
    
    public long length()
    {
      return 0L;
    }
    
    public String toString()
    {
      return new String("ServerInfo1[name=" + this.name + ",versionMajor=" + this.versionMajor + ",versionMinor=" + this.versionMinor + ",type=0x" + Dumper.toHexString(this.type, 8) + ",commentOrMasterBrowser=" + this.commentOrMasterBrowser + "]");
    }
  }
}


/* Location:           C:\Users\Admin\Desktop\Decompiler\JAD\jd-gui-0.3.6.windows\classes_dex2jar.jar
 * Qualified Name:     com.dynamixsoftware.printershare.smb.NetServerEnum2Response
 * JD-Core Version:    0.7.0.1
 */